var stage = document.getElementById('stage');

//方块数组
var arr = [];

for (var i = 1; i <= 10; i ++) {
    var block = new Block(stage, {backgroundColor: Tools.getColor()});
    block.render();
    block.positionRandom();
    arr.push(block);
}

setInterval(function() {
    for (var i = 0; i < arr.length; i ++) {
        arr[i].positionRandom();
    }
}, 1000);